package com.AJava1710D.xianchengchi;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * 作者: LCG
 * 日期: 2020/6/23 10:08
 * 描述:
 */
public class MyRejectImpl implements RejectedExecutionHandler {

    private LinkedBlockingQueue<Runnable> linkedBlockingQueue;

    public MyRejectImpl(LinkedBlockingQueue<Runnable> linkedBlockingQueue) {
        this.linkedBlockingQueue = linkedBlockingQueue;
    }

    @Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
        System.out.println("=======处理拒绝执行的任务======");
    }


}
